#!/bin/bash

MYDIR=`dirname $BASH_SOURCE`

pushd "$MYDIR" > /dev/null
if [[ $(make --dry-run -s) ]]
then
  echo make thinks the interpreter is out of date and needs to be re-built
  exit
fi
popd > /dev/null

java -cp "$CUP_DIR/java-cup-11b-runtime.jar:$MYDIR" -ss1g -ea interpreter.Interpreter $*

echo Process returned $?
